From fe06e62ff8771678fdb3a46faaf16f2f93dd09b7 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Sun, 11 Sep 2022 22:00:37 +0200
Subject: [PATCH] portable install(1) use

---
 util/install_helper.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/util/install_helper.sh b/util/install_helper.sh
index 33f4a42..6884c61 100755
--- a/util/install_helper.sh
+++ b/util/install_helper.sh
@@ -24,7 +24,8 @@ else
     DESTDIR="${DESTDIR%/}"
 fi
 
-install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
+install -d -m 755 "${DESTDIR}${sysconfdir}"
+install -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
 	"${DESTDIR}${sysconfdir}/fuse.conf"
 
 if $useroot; then
@@ -37,11 +38,13 @@ if $useroot; then
     fi
 fi
 
-install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
+install -d -m 755 "${DESTDIR}${udevrulesdir}"
+install -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
         "${DESTDIR}${udevrulesdir}/99-fuse3.rules"
 
 if [ "$initscriptdir" != "" ]; then
-    install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \
+    install -d -m 755 "${DESTDIR}/etc/init.d"
+    install -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \
             "${DESTDIR}${initscriptdir}/fuse3"
 
     if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then
-- 
2.37.1

